#include "comm.hpp"

using namespace std;

int main()
{
    Init init;
    int fd=open(FIFO_FILE,O_RDONLY);
    if (fd < 0)
    {
        exit(1);
    }
    while(true)
    {
        char buffer[1024]={0};
        int x=read(fd,buffer,sizeof(buffer));
        if(x>0)
        {
            buffer[x]=0;
            cout << "client say" << buffer << endl;
        }
         else if (x == 0)
        {
            break;
        }
        else
            break;
    }
    close(fd);
    return 0;
}